<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"    "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
	<constant name="struts.enable.DynamicMethodInvocation" value="false" />
	<constant name="struts.devMode" value="true" />
	<constant name="struts.custom.i18n.resources" value="ApplicationResources" />
	
	<package name="default" extends="struts-default" namespace="/">
		
		<result-types>
      		<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult"/>
      		<result-type name="json" class="com.googlecode.jsonplugin.JSONResult"/>
    	</result-types>
    	    	
    	<interceptors> 
			<interceptor name="sessionInterceptor" class="it.apiconsulting.wot.session.SessionInterceptor" />
			
			<interceptor-stack name="tstSessionCheckStack"> 
				<interceptor-ref name="sessionInterceptor" /> 
				<interceptor-ref name="defaultStack" /> 
			</interceptor-stack> 
		</interceptors>
		<default-interceptor-ref name="tstSessionCheckStack"/> 
    	<global-results> 
			<result name="sessionexpired">sessionexpired.jsp</result> 
		</global-results> 
    	
		<action name="login" class="it.apiconsulting.wot.view.LoginAction" method="execute">
			<result name="success" type="tiles">welcome</result>
            <result name="error">index.jsp</result>
        </action>
        
        <action name="links" class="it.apiconsulting.wot.view.LinksAction" method="execute">
        	<interceptor-ref name="sessionInterceptor"/>
            <result name="success" type="tiles">links</result>
            <result name="error">index.jsp</result>
        </action>
        
         
        <action name="charts" class="it.apiconsulting.wot.view.ChartsAction" method="execute">
        	<interceptor-ref name="sessionInterceptor"/>
            <result name="success" type="tiles">charts</result>
            <result name="error">index.jsp</result>
        </action>
	</package>
	
	<package name="defaultJson" extends="struts-default" namespace="/">
		
		<result-types>
      		<result-type name="json" class="com.googlecode.jsonplugin.JSONResult"/>
    	</result-types>
    	    	
    	<interceptors> 
			<interceptor name="sessionInterceptor" class="it.apiconsulting.wot.session.SessionInterceptor" />
			
			<interceptor-stack name="tstSessionCheckStack"> 
				<interceptor-ref name="sessionInterceptor" /> 
				<interceptor-ref name="defaultStack" /> 
			</interceptor-stack> 
		</interceptors>
		<default-interceptor-ref name="tstSessionCheckStack"/> 
    	<global-results> 
			<result name="sessionexpired">sessionexpired.jsp</result> 
		</global-results> 
        
        <action name="getTest" class="it.apiconsulting.wot.jsonView.TestJsonAction" method="execute">
			<result name="success" type="json"/>
		</action>
		
		<action name="getSchedeUtente" class="it.apiconsulting.wot.jsonView.SchedaUtenteJsonAction" method="execute">
			<result name="success" type="json"/>
		</action>
		
		<action name="getDettaglioUtente" class="it.apiconsulting.wot.jsonView.DettaglioUtenteJsonAction" method="execute">
			<result name="success" type="json"/>
		</action>
	</package>
</struts>